-- GENERATED SPELL FOR [Vol'jin] --


function spell0_10540(pUnit, Event) --@Hex,n/a--
pUnit:FullCastSpellOnTarget(16097,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10540', 10333, 1)
end

function spell1_10540(pUnit, Event) --@Shadow Shock,n/a--
pUnit:FullCastSpellOnTarget(17289,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10540', 542, 1)
end

function spell2_10540(pUnit, Event) --@Shadow Word: Pain,n/a--
pUnit:FullCastSpellOnTarget(17146,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10540', 18000, 1)
end

function spell3_10540(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(20463,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10540', 599, 1)
end

function spell4_10540(pUnit, Event) --@Veil of Shadow,Heal--
pUnit:FullCastSpellOnTarget(17820,pUnit)
pUnit:RegisterEvent('Sorts_10540', 16500, 1)
end

function Sorts_10540(pUnit, Event)
local choix_sorts_10540 = math.random(0, 4)
if choix_sorts_10540 == 0 then
pUnit:RegisterEvent('spell0_10540', 1, 1)
end
if choix_sorts_10540 == 1 then
pUnit:RegisterEvent('spell1_10540', 1, 1)
end
if choix_sorts_10540 == 2 then
pUnit:RegisterEvent('spell2_10540', 1, 1)
end
if choix_sorts_10540 == 3 then
pUnit:RegisterEvent('spell3_10540', 1, 1)
end
if choix_sorts_10540 == 4 then
pUnit:RegisterEvent('spell4_10540', 1, 1)
end
end

function mob10540_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_10540', math.random(1500, 3000), 1)
end

function mob10540_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10540_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10540_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(10540, 1, 'mob10540_Action')
RegisterUnitEvent(10540, 2, 'mob10540_Leave')
RegisterUnitEvent(10540, 3, 'mob10540_Kill')
RegisterUnitEvent(10540, 4, 'mob10540_Die')
